.class public Lcom/ninesky/browser/view/Dots;
.super Landroid/widget/LinearLayout;


# instance fields
.field private a:I

.field private b:I


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/ninesky/browser/view/Dots;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 5

    const/4 v4, 0x0

    const/4 v2, -0x2

    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x3

    iput v0, p0, Lcom/ninesky/browser/view/Dots;->a:I

    const/4 v0, -0x1

    iput v0, p0, Lcom/ninesky/browser/view/Dots;->b:I

    const/16 v0, 0x11

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/view/Dots;->setGravity(I)V

    const/4 v0, 0x2

    const/4 v1, 0x4

    invoke-virtual {p0, v4, v0, v4, v1}, Lcom/ninesky/browser/view/Dots;->setPadding(IIII)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v2, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v1, v2, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    iget-object v2, p0, Lcom/ninesky/browser/view/Dots;->mContext:Landroid/content/Context;

    const/high16 v3, 0x4110

    invoke-static {v2, v3}, Lcom/ninesky/a/c;->a(Landroid/content/Context;F)I

    move-result v2

    iput v2, v1, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    move v2, v4

    :goto_0
    iget v3, p0, Lcom/ninesky/browser/view/Dots;->a:I

    if-lt v2, v3, :cond_0

    return-void

    :cond_0
    new-instance v3, Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/ninesky/browser/view/Dots;->mContext:Landroid/content/Context;

    invoke-direct {v3, v4}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    const v4, 0x7f020031

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setImageResource(I)V

    if-nez v2, :cond_1

    invoke-virtual {p0, v3, v0}, Lcom/ninesky/browser/view/Dots;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    :goto_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {p0, v3, v1}, Lcom/ninesky/browser/view/Dots;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_1
.end method


# virtual methods
.method public final a(I)V
    .locals 2

    if-ltz p1, :cond_0

    iget v0, p0, Lcom/ninesky/browser/view/Dots;->a:I

    if-lt p1, v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget v0, p0, Lcom/ninesky/browser/view/Dots;->b:I

    if-ltz v0, :cond_2

    iget v0, p0, Lcom/ninesky/browser/view/Dots;->b:I

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/view/Dots;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    const v1, 0x7f020031

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    :cond_2
    invoke-virtual {p0, p1}, Lcom/ninesky/browser/view/Dots;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    const v1, 0x7f020030

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    iput p1, p0, Lcom/ninesky/browser/view/Dots;->b:I

    goto :goto_0
.end method
